import Vue from 'vue'
import Router from 'vue-router'

// import HelloWorld from '@/components/content'
// 引入我的登陆组件
import login from '@/pages/login/login'
// 引入我的客户页面
import Content from '@/pages/myClientSubPages/content'
// 引入监控页面
import monitoring from '@/pages/monitoring/content'
// 引入数据报表
import dataReport from '@/pages/dataReport/content'
// 引入历史轨迹
import historyTrail from '@/pages/monitoring/history'

import caveatRecording from '@/pages/dataReport/caveatRecording'

import offlineStatistics from '@/pages/dataReport/offlineStatistics'

import drivingStatistics from '@/pages/dataReport/drivingStatistics'

import mileageStatistics from '@/pages/dataReport/mileageStatistics'

import totalMileageStatistics from '@/pages/dataReport/totalMileageStatistics'

Vue.use(Router)
export default new Router({
    mode: 'history',
    routes: [
        {
            path: '/',
            component: login
        },
        {
            path: '/login',
            name: 'login',
            component: login
        },
        {
            path: '/myClient',
            name: 'myClient',
            component: Content
        },
        {
            path: '/monitoring',
            name: 'monitoring',
            component: monitoring
        },
        {
            path: '/history',
            name: 'history',
            components: {
                history: historyTrail
            }
        },
        {
            path: '/dataReport',
            name: 'dataReport',
            component: dataReport,
            children: [
                {
                    path: '/caveatRecording',
                    component: caveatRecording
                },
                {
                    path: '/offlineStatistics',
                    component: offlineStatistics
                },
                {
                    path: '/drivingStatistics',
                    component: drivingStatistics
                },
                {
                    path: '/mileageStatistics',
                    component: mileageStatistics
                },
                {
                    path: '/totalMileageStatistics',
                    component: totalMileageStatistics
                },
            ]
        }
    ]
})
